package com.mo.design.pattern.creational.singleton;

public class SynchronizedSingleton02 {
    private static SynchronizedSingleton02 singleton;

    private SynchronizedSingleton02() {

    }

    public static  SynchronizedSingleton02 getInstance() {
        synchronized (SynchronizedSingleton02.class) {
            if (singleton == null) {
                singleton = new SynchronizedSingleton02();
            }
            return singleton;
        }
    }
}
